package com.qys.livesMall.shop.controller.app;


import com.qys.livesMall.common.result.R;
import com.qys.livesMall.framework.utils.SecurityUtils;
import com.qys.livesMall.shop.modal.vo.AdvertisementVO;
import com.qys.livesMall.shop.service.AdvertisementService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 广告表(Advertisement)表控制层
 *
 * @author makejava
 * @since 2023-06-28 09:12:47
 */
@RestController
@RequestMapping("/app/advertisement")
@Tag(name = "app-广告弹窗", description = "app-广告弹窗")
public class AppAdvertisementController {

    @Resource
    private AdvertisementService advertisementService;

    /**
     * 获取弹窗广告
     *
     * @return 所有数据
     */
    @PostMapping("/getAdvertisement")
    @Operation(summary = "获取弹窗广告")
    public R<List<AdvertisementVO>> selectAll() {
        return R.ok(advertisementService.getAdvertisement(SecurityUtils.getUserId()));
    }

}

